.option nopic
.text
.section .rodata
.align 3
.LC0:
        .string "this is a."
        .align  3
.LC1:
        .string "this is b."
        .align  3
.LC2:
        .string "i don't know what the char is"

.text
.align 2
.globl main
.type main, @function
main:
    addi sp, sp, -32
    sd ra, 24(sp)
    sd s0, 16(sp)
    addi s0, sp, 32

    call getchar
    sb a0, -20(s0)
    lbu a5, -20(s0)
    sext.w a4, a5
    li a5, 'a'
    beq a4, a5, .L2
    li a5, 'b'
    beq a4, a5, .L3
    j .L4
.L2:
    lui a0, %hi(.LC0)
    addi a0, a0, %lo(.LC0)
    call puts
    j .L5
.L3:
    lui a0, %hi(.LC1)
    addi a0, a0, %lo(.LC1)
    call puts
    j .L5
.L4:
    lui a0, %hi(.LC2)
    addi a0, a0, %lo(.LC2)
    call puts
.L5:

    mv a0, zero
    ld s0, 16(sp)
    ld ra, 24(sp)
    addi sp, sp, 32
    jr ra